package com.tbvtc.agriculturalcreditchainserver2025.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author shiyuhao
 * @since 2025-03-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@Schema(description = "User对象")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "ID,主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "身份")
    private Integer roleId;

    @Schema(description = "电话")
    private String phone;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "角色地址")
    private String address;
    @Schema(description = "角色头像")
    private String userImage;
    @Schema(description = "是否认证")
    private Integer isAudit;
    @Schema(description = "是否禁用")
    private Integer isDisable;

}
